package com.qssoft.cqry.common.shardingsphere.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

;

/**
 * @program: cloud-cqry
 * @description:
 * @author: HuaQiao.Deng
 * @create: 2021-01-29 14:22
 */
@Data
@Component
@ConfigurationProperties(prefix = "spring.datasource")
public class DataSourceProperties {

    /**
     * 数据库相关属性映射关系
     * key: 数据源节点描述
     * Map<String,DruidProperties> : 数据节点、数据源
     */
    //private Map<String,Map<String,DruidProperties>> druids;
    private Map<String,DruidProperties> druids;

    /**
     * 默认的数据源
     */
    private String defaultDataSource;

}